package com.burgeon.backend.SHOP.service;


import com.burgeon.backend.SHOP.entity.*;
import com.burgeon.backend.SHOP.service.ex.OrderExceptionApp;

import java.util.HashMap;
import java.util.List;

public interface OrderService {


    PayData createOrderByBasketZT(String uid, String openid, String phoneZT,String nameZT,String dateZT,
                                String cid, String phone,String token,String comment,String store,String distance,
                                String emp, String discount,String isPlus) throws OrderExceptionApp;


    //自提购买
    PayData CreateOrderZT(String uid, String openid,String phoneZT,String nameZT,
                          String gid,String cid, String code,String store,String distance,
                          String dateZT,
                          String type,String phone, String token,String emp,String comment,
                          String discount,String isPlus) throws OrderExceptionApp;



    //秒杀自提
    PayData seckillCreateOrderZT(String uid, String openid,String phoneZT,String nameZT,
                                  String sid, String code,String store,String distance,String dateZT,
                                  String type,String phone, String token,String emp,String comment) throws OrderExceptionApp;

    //秒杀订单
    PayData seckillCreateOrder(String uid, String openid, String aid,String mid,
                               String sid,String cid,String code,String type, String phone,
                               String token,String comment,String emp)
            throws OrderExceptionApp;


    //预售支付尾款
    PayData payForThebalance(Order order, Address address, String phone, Mail mail ,
                             String comment, String openid, String token) throws OrderExceptionApp;



    Integer NumberOfDaysOfSelfPickupDelay(String token);

    //自提
    PayData integralCreateOrderZT(String uid, String openid,String phoneZT,String nameZT,
                                 String gid, String code,String store,String distance,String dateZT,
                                 String type,String phone, String token,String emp,String comment) throws OrderExceptionApp;

    //积分订单
    PayData integralCreateOrder(String uid, String openid, String aid, String mid,
                                String gid, String code, String type,
                                String phone, String token, String comment, String emp)throws OrderExceptionApp;



    //砍价到店自取
    PayData bargainCreateOrderZT(String uid, String openid,String phoneZT,String nameZT,
                               String gid, String code,String store,String distance,String date,
                               String type,String phone, String token,String emp,String comment) throws OrderExceptionApp;


    //砍价付款
    PayData bargainCreateOrder(String uid, String openid, String aid,
                               String gid, String code,int mailFee,
                               String type,String phone, String token,String comment) throws OrderExceptionApp;


    //团购付款
    PayData groupCreateOrder(String uid, String openid, String aid,String newPrice,
                              String mid, String gid, String cid, String code,
                              String type,String phone, String token,String comment,String emp) throws OrderExceptionApp;

    void DelOrder(String id,String token);

    void UpOrderState(String id,String token);

    PayData payForTheOrder(String oid,String openid,String token) throws OrderExceptionApp;

    OrderResult GetLatestOrder(String oid, String uid, String token);

    void UpERPData(Order order);

    Order FindOrderByCode(String code);

    Order FindOrder(String id);

    List<Order> getUserOrder(String uid,String token);

    HashMap<String ,Integer> getWebOrderCount(String uid,String token);

    void UpOrderState(String code,String state,String date);

    /**
     *  购物车下单
     * @param uid
     * @param aid

     * @param phone
     * @return
     */
    PayData createOrderByBasket(String uid, String openid, String aid,String mid,
                                String cid, String phone,String token,String comment,
                                String emp, String discount,String isPlus) throws OrderExceptionApp;

    /**
     * 立即购买
     * @param uid
     * @param aid
     * @param phone
     * @param token
     * @return
     * @throws OrderExceptionApp
     */
    PayData createOrder(String uid, String openid, String aid,String mid, String gid,
                        String cid,String code,String type, String phone, String token,
                        String comment,String emp, String discount,String isPlus)throws OrderExceptionApp;

    PayData integralOrderBirthdayZT(String uid, String openid, String phoneZT, String nameZT, String gid, String code, String store, String distance, String dateZT, String s, String phone, String token, String emp, String comment);

    PayData integralBirthdayOrder(String uid, String openid, String aid, String mid, String gid, String code, String s, String phone, String token, String comment, String emp);
}
